﻿@model IEnumerable<GsifWeb4.ViewModels.MatchStatPerson>
                        
<td>
		<table style="width:100%">
                        <tr>
                           @{
                               
                           var players = Model.Where(stat => stat.Position > (int)ViewData["minPosition"] && stat.Position < (int)ViewData["maxPosition"]);
                           var percentEach = "" + Convert.ToInt32(100 / players.Count()) + '%';
                           for (int i = 0; i < players.Count(); i++)
                           {
                               <td style="text-align: center; width:@(percentEach)"></td>
                           }
                           }
                        </tr>
                        <tr>
                            @{
                                foreach (var player in players)
                                {
                                <td style="text-align: center; column-span: none; font-size: x-small">
					                @{Html.RenderPartial("_MatchReportPlayerForm", player);
                                }
				                </td>
                            } 
                            }
                        </tr>
            </table>
</td>